<?php

declare(strict_types=1);

namespace app\common\logic;

use app\common\model\Paylog as ModelPaylog;

class Paylog
{
    /**
     * 创建用户支付记录
     *
     * @param integer $uid
     * @param integer $scene
     */
    public static function create(int $uid, int $scene)
    {
        return ModelPaylog::create([
            'user_id'      => $uid,
            'scene'        => $scene,
            'out_trade_no' => Snowflake::ordersn($scene),
        ]);
    }
}
